using ETestIT.Core;
using FluentNHibernate.Mapping;

namespace ETestIT.Data.NHibernateMaps
{
    public class CandidateResumeMap : ClassMap<CandidateResume>
    {
        public CandidateResumeMap()
        {
            Id(x => x.Id)
                .WithUnsavedValue(0)
                .GeneratedBy.Identity();

            References(x => x.TheJobTitle);
            References(x => x.TheCandidate);

            References(x => x.TheResume)
                .FetchType.Select()
                .Cascade.All();
        }
    }
}